<html>
<head>
<SCRIPT TYPE=\"text/javascript\" LANGUAGE=\"javascript\">



function waitPreloadPage() { //DOM

if (document.getElementById){
document.getElementById('prepage').style.visibility='hidden';
}else{
if (document.layers){ //NS4
document.prepage.visibility = 'hidden';
}
else { //IE4
document.all.prepage.style.visibility = 'hidden';
}
}
}

function hello(){
alert("hello");
}


</script>


</head>
<body onLoad="javascript:hello();">

<DIV id="prepage"> 
<TABLE width=100%><TR><TD><B><img src="ajaxLoad.gif">Loading ... ... Please waitttt!</B></TD></TR></TABLE>
</DIV>


<?php
$q=$_GET["q"];

$xmlDoc = new DOMDocument();
$xmlDoc->load("cd_catalog.xml");

$x=$xmlDoc->getElementsByTagName('ARTIST');

for ($i=0; $i<=$x->length-1; $i++)
{
//Process only element nodes
if ($x->item($i)->nodeType==1)
  {
  if ($x->item($i)->childNodes->item(0)->nodeValue == $q)
    { 
    $y=($x->item($i)->parentNode);
    }
  }
}

$cd=($y->childNodes);

for ($i=0;$i<$cd->length;$i++)
{ 
//Process only element nodes
if ($cd->item($i)->nodeType==1)
  { 
  echo($cd->item($i)->nodeName);
  echo(": ");
  echo($cd->item($i)->childNodes->item(0)->nodeValue);
  echo("<br />");
  } 
}
?>
</body>
</html>



